// 项目
import request from '@/utils/request'

let BASE_ADDRESS = '/doc/project'

//查订单id /financial/order/getById
export const getOrderByIdApi = (params) =>{
    return request({
        url: `/financial/order/getById`,
        method: "get",
        params
    })
}

//获取项目信息 /doc/project/getInfo
export const getProjectGetInfoApi = (params) =>{
    return request({
        url: `${BASE_ADDRESS}/getInfo`,
        method: 'get',
        params
    })
}

// 项目修改 /doc/project/edit
export const editProjectApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: 'put',
        data
    })
}

// 查询当前专家下的项目列表  /financial/order/expertOrder
export const getExpertOrderListApi = (params) =>{
    return request({
        url: `/financial/order/expertOrderSort`,
        method: 'get',
        params
    })
}

// 查询项目列表 /doc/project/list
export const getProjectListApi =(params)=>{
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: 'get',
        params
    })
}

// 判断当前项目是否完成 /doc/project/isFinished
export const getProjectIsFinishedApi = (params) =>{
    return request({
        url: `${BASE_ADDRESS}/isFinished`,
        method: 'get',
        params
    })
}

//修改消费订单 /financial/order/edit
export const editFinancialOrderApi = (data) =>{
    return request({
        url: `/financial/order/edit`,
        method: 'put',
        data
    })
} 

//根据项目id去查消费订单id /financial/order/list
export const getOrderListApi = (params) =>{
    return request({
        url: `/financial/order/list`,
        method: 'get',
        params
    })
}

// 上传项目材料  /doc/project/uploadProjectMaterials
export const uploadProjectMaterialsApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/uploadProjectMaterials`,
        method: 'post',
        data
    })
}

// 获取当前专家助理下的所有项目列表  /financial/order/assistantOrder
export const getOrderAssistantOrderApi = (params) =>{
    return request({
        url: `/financial/order/assistantOrder`,
        method: 'get',
        params
    })
}


// 专家助理分页查询 /work/assistant//assistantVoList
export const getAssistanListApi = (params) =>{
    return request({
        url: `/work/assistant/assistantVoList`,
        method: 'GET',
        params
    })
}

//添加专家助理 /work/assistant/inviteJoin
export const addAssistantApi = (params) =>{
    return request({
        url: `/work/assistant/inviteJoin`,
        method: 'post',
        params
    })
}

// 删除专家助理 /work/assistant/removeAssistant/{expertId}/{userId}
export const removeAssistantApi= (expertId,userId) =>{
    return request({
        url: `/work/assistant/removeAssistant/${expertId}/${userId}`,
        method: 'DELETE',
    })
}

// 上传项目材料样本 /doc/project/uploadMaterialsSample
export const uploadMaterialsSampleApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/uploadMaterialsSample`,
        method: 'post',
        data
    })
}

// 添加备注 /financial/order/inertOrderRemark
export const addInertOrderRemarkApi = (data) =>{
    return request({
        url: `/financial/order/inertOrderRemark`,
        method: 'post',
        data
    })
}

// 修改备注 /financial/order/updateOrderRemark
export const editInertOrderRemarkApi = (data) =>{
    return request({
        url: `/financial/order/updateOrderRemark`,
        method: 'put',
        data
    })
}